One of conventional imaging devices is an imaging device having a lens array in which a plurality of lenses is integrally formed (see Patent Literature 1, for example). Hereinafter, an imaging device of Patent Literature 1 is described with reference to FIGS. 30 and 31.
FIG. 30 is an exploded perspective view of an imaging device 901 of Patent Literature 1. FIG. 31 is an explanatory diagram of imaging blocks of the imaging device 901 of Patent Literature 1.
As shown in FIGS. 30 and 31, the imaging device 901 includes an aperture member 902, an optical block array 903, a light-shielding block 904, an optical filter 906, an imaging unit 907, a driving circuit 908, a disparity calculation circuit 909, and a semiconductor substrate 910
The aperture member 902 is a member which adjusts the amount of light entering the optical block array 903, and includes plural openings 902a, 902b, 902c, and 902d. 
The optical block array 903 is what is known as lens array, and is a member on which plural optical blocks 903a, 903b, 903c, and 903d are integrally formed. Here, the optical axes of the plural optical blocks 903a, 903b, 903c, and 903d are approximately parallel with one another. Each of the optical blocks 903a, 903b, 903c, and 903d is provided in correspondence with one of the openings 902a, 902b, 902c, and 902d of the aperture member 902:
The light-shielding block 904 is a member which prevents the light entering each opening of the aperture member 902 from reaching the image blocks other than the corresponding imaging block.
The optical filter 906 is a member which includes an optical low-pass filter and an infrared cut filter, for example.
The imaging unit 907 is a solid-state imaging element such as a CCD sensor or a CMOS sensor, and includes imaging blocks 907a, 907b, 907c, and 907d corresponding to the optical blocks 903a, 903b, 903c, and 903d of the optical block array 903, respectively.
The driving circuit 908 is a circuit provided on the semiconductor substrate 910, and drives the imaging unit 907.
The disparity calculation circuit 909 is a circuit for calculating a disparity between images formed on the imaging blocks.
The semiconductor substrate 910 is a substrate on which the imaging unit 907, the driving circuit 908, the disparity calculation circuit 909 and so on are disposed.
The light passing through the openings 902a, 902b, 902c, and 902d of the aperture member 902 is refracted by the optical blocks 903a, 903b, 903c, and 903d, and then passes through the light-shielding block 904 and the optical filter 906 to form an image on the imaging blocks 907a, 907b, 907c, and 907d. 
Then, the distance between the imaging device 901 and the object is calculated by calculating a disparity between the images obtained from the imaging blocks. For example, the disparity calculation circuit 909 performs a block matching operation to calculate the degree of similarity in blocks between the image obtained from the imaging block 907a and the image obtained from the imaging block 907b. Subsequently, the disparity calculation circuit 909 calculates a disparity d based on the degree of similarity calculated. After that, the disparity calculation circuit 909 calculates a distance L from the disparity d, using Equation (1).
                    [                  Math          .                                          ⁢          1                ]                                                            L        =                  fB          pd                                    (        1        )            
Here, f denotes the focal length of the optical blocks 903a and 903b. Further, B denotes a spacing between the optical axis of the optical block 903a and the optical axis of the optical block 903b. Furthermore, p denotes a pixel spacing of the imaging unit 907 in the direction connecting the optical axes of the optical blocks 903a and 903b. 
In this manner, the imaging device 901 having the optical block array 903 calculates the distance to the object. However, the optical block array 903 changes its shape as the temperature varies. That is to say, there is a problem of a greater error in the distance calculated using Equation (1), because temperature variation causes a change in the spacing between the optical axes.
In view of the problem, an imaging device has conventionally been proposed which includes a thermal sensor for detecting temperature, so that the distance measuring precision is increased using the detected temperature (see Patent Literature 2, for example). The following describes how the distance measuring precision is increased when the imaging device 901 shown in FIGS. 30 and 31 has a thermal sensor.
When the temperature detected by the thermal sensor of the imaging device 901 is assumed as a detected temperature T, an amount of change z in the distance between the optical axes is calculated using Equation (2).[Math. 2]z=B(aL−aS)(T−T0)  (2)
Here, aL denotes a linear thermal expansion coefficient of the optical block array, and aS denotes a linear thermal expansion coefficient of the imaging unit. Further, T0 denotes a reference temperature, and B denotes a distance between the optical axes of the optical blocks at the reference temperature T0.
Using the amount of change z in the distance between the optical axes, which is calculated in the above manner, the imaging device corrects the images obtained from the imaging blocks.
To be more specific, in the case where an image I1 obtained from the imaging block 907a is used as a reference as shown in Equation (3), the imaging device corrects images I2, I3, and I4 obtained from the imaging blocks 907b, 907c, and 907d, by using Equations (4), (5), and (6), respectively.
It is to be noted that the optical axis of the optical block 903a and that of the optical block 903b are x-axially distant from each other by a distance B. Likewise, the optical axis of the optical block 903c and that of the optical block 903d are x-axially distant from each other by the distance B. Further, the optical axis of the optical block 903a and that of the optical block 903c are y-axially distant from each other by the distance B. Likewise, the optical axis of the optical block 903b and that of the optical block 903d are y-axially distant from each other by the distance B.
                    [                  Math          .                                          ⁢          3                ]                                                                      I          ⁢                                          ⁢          1          ⁢                      (                          x              ,              y                        )                          =                  I          ⁢                                          ⁢          1          ⁢                      (                          x              ,              y                        )                                              (        3        )                                          I          ⁢                                          ⁢          2          ⁢                      (                          x              ,              y                        )                          =                  I          ⁢                                          ⁢          2          ⁢                      (                                          x                +                                  z                  p                                            ,              y                        )                                              (        4        )                                          I          ⁢                                          ⁢          3          ⁢                      (                          x              ,              y                        )                          =                  I          ⁢                                          ⁢          3          ⁢                      (                          x              ,                              y                +                                  z                  p                                                      )                                              (        5        )                                          I          ⁢                                          ⁢          4          ⁢                      (                          x              ,              y                        )                          =                  I          ⁢                                          ⁢          4          ⁢                      (                                          x                +                                  z                  p                                            ,                              y                +                                  z                  p                                                      )                                              (        6        )            
Here, p denotes x- and y-axial pixel spacings of the imaging unit 907. Further, I1 (x, y), I2 (x, y), I3 (x, y), and I4 (x, y) denote image luminance at coordinates (x, y) before and after correction.
A temperature variation causes the optical block 903b to shift x-axially by z/p pixel(s) with respect to the optical block 903a. Thus, the imaging device corrects I2 (x, y) as shown in Equation (4) so that the image shifts x-axially by z/p pixel(s).
Further, a temperature variation causes the optical block 903c to shift y-axially by zip pixel(s) with respect to the optical block 903a. Thus, the imaging device corrects I3 (x, y) as shown in Equation (5) so that the image shifts y-axially by z/p pixel(s).
Furthermore, a temperature variation causes the optical block 903d to shift by z/p pixel(s) both x-axially and y-axially with respect to the optical block 903a. Thus, the imaging device corrects I4 (x, y) as shown in Equation (6) so that the image shifts by z/p pixel(s) both x-axially and y-axially.
Calculation of the distance to the object using such corrected images leads to increase in the distance measuring precision of the imaging device.
[Citation List]
[Patent Literature]
[Patent Literature 1]
Japanese Unexamined Patent Application Publication No. 2003-143459
[Patent Literature 2]
Japanese Unexamined Patent Application Publication No. 2002-204462